package com.springday3aoptransaction.service;

import com.springday3aoptransaction.domain.Account;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.util.List;

public interface AccountService {
    List<Account> findAll();
    Account findById(Integer id);

    /**
     * 转账操作
     * @param out 传出方
     * @param in 传入方
     * @param money 金额
     */
    @Transactional(rollbackFor = {IOException.class})
    public void transfer(String out, String in, Double money) throws IOException;
}
